package cn.tedu.array;

public class Test7_Array2 {
    public static void main(String[] args) {
        method();
        method2();
    }
    public static void method2(){
        int[] a = new int[10];

        for (int i = 0; i < a.length; i++) {
            a[i] = i + 1;
        }

        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i]);
        }
    }

    public static void method(){
        int[] a = {31,28,31,30,31,30,31,31,30,31,30,31};

        for (int i = 0; i < a.length; i++) {
            System.out.println(i+1+"月有"+a[i]+"天");
        }
    }
    
}
